* controls for pref. specification
local ControlsC $Controls Creativity $TestC 

* control for robustness checks
local ControlsC_notee $Controls_notee Creativity $TestC 	/* without control for teacher evaluation error*/
local ControlsI   $Controls Creativity $TestI 				/* with controls for 5 separate cog. ability measures*/
local ControlsCNL $Controls Creativity SCogAbility*			/* with non-linear control for single cog. ability measure*/

*local ControlsCIn $Controls Creativity $TestC CreativityCog


program drop _all 

capture drop program prog1

program define prog1, rclass
    args S ControlsC ControlsC_notee ControlsI ControlsCNL
	disp `S'

		if `S'==1{
			* pref.
			local keepvars "CogAbility"
			local ipw 1
			local Ct `ControlsC'
			local name "pref"
		}
		
		if `S'==2{
			* without control for teacher evalaution error
			local keepvars "CogAbility"
			local ipw 1
			local Ct `ControlsC_notee'
			local name "notee"
		}
		
		if `S'==3{
			* with controls for 5 separate cognitive ability measures
			local keepvars " "
			local ipw 1
			local Ct `ControlsI'
			local name "icog"
		}
		
		if `S'==4{
			* with non-lienar control for single cognitive ability fa
			local keepvars " "
			local ipw 1
			local Ct `ControlsCNL'
			local name "nlcog"
		}
		
		if `S'==5{
			* without ipw
			local keepvars "CogAbility"
			local ipw 0
			local Ct `ControlsC'
			local name "nlcog"
		}
		
	disp "`Ct'"
    return local keepvars "`keepvars'"
	return local ipw `ipw'
	return local Ct `Ct'
	return local name `name'
	
end

prog1 1 "`ControlsC'" "`ControlsC_notee'" "`ControlsI'" "`ControlsCNL'"
return li
